<template>
  <div class="error-page">
    <div class="error-content">
      <div class="error-image">
        <el-image :src="require('@/assets/images/403.svg')" alt="403" />
      </div>
      <h1 class="error-title">403</h1>
      <h2 class="error-subtitle">访问被拒绝</h2>
      <p class="error-desc">抱歉，您没有权限访问该页面</p>
      <div class="error-actions">
        <el-button type="primary" @click="goBack">返回上一页</el-button>
        <el-button @click="goHome">回到首页</el-button>
      </div>
    </div>
  </div>
</template>

<script setup>
import { useRouter } from 'vue-router'

const router = useRouter()

const goBack = () => {
  router.go(-1)
}

const goHome = () => {
  router.push('/')
}
</script>

<style scoped>
.error-page {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background-color: #f5f7fa;
}

.error-content {
  text-align: center;
  padding: 40px;
  max-width: 600px;
}

.error-image {
  max-width: 300px;
  margin: 0 auto 30px;
}

.error-title {
  font-size: 72px;
  color: #f56c6c;
  margin: 0 0 20px;
  line-height: 1;
}

.error-subtitle {
  font-size: 24px;
  color: #303133;
  margin: 0 0 15px;
  font-weight: 500;
}

.error-desc {
  font-size: 16px;
  color: #606266;
  margin: 0 0 30px;
}

.error-actions {
  display: flex;
  justify-content: center;
  gap: 20px;
}
</style> 